package com.example.Laboratory.Mapper;


import com.example.Laboratory.Entity.Company;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CompanyMapper {
    //增加校企合作
    @Insert("INSERT INTO company ( company_name, company_link)" +
            "VALUES(#{company_name},#{company_link})")
    int addCompany (Company t);

    //查找校企合作
    @Select("SELECT * FROM company")
    List<Company> selectCompany ( );

    //删除校企合作
    @Delete("DELETE FROM company WHERE company_id=#{company_id}")
    int deleteCompany (int company_id);

    //修改校企合作
    @Update("UPDATE company SET  company_name=#{company_name}, " +
            "company_link=#{company_link} WHERE company_id=#{company_id}")
    int updateCompany (Company i);
}
